package Client;

import java.util.ArrayList;

public class procesaVariable {
	ArrayList <String> var = new ArrayList<String>();

	public procesaVariable(String cadena) {
		if(cadena!=null)
		{
		procesar(cadena);
		}
	}

	public procesaVariable() {

	}
	public void procesar (String cadena){
		String temp = "";
		for(int i=0; i<cadena.length(); i++){
			String c = cadena.substring(i, i+1);
			char [] t=c.toCharArray();
			if(t[0]!=59){
				temp = temp + c;
				if (i == cadena.length()-1)
					var.add(temp);
			}
			else {
				var.add(temp);
				temp="";
			}
		}
	}

	public ArrayList<String> getComando() {
		return var;
	}


	public String getVar(int i) {
		if(i<var.size())
			return var.get(i);
		else{
			return null;
		}
	}
	
	public void setVar(ArrayList<String> comando) {
		this.var = comando;
	}
	
	
	
}
